package com.sright.bcard.common.biz.service;

import com.sright.bcard.common.biz.manager.VideoConvertManager;
import com.sright.bcard.common.share.service.TranscodeService;
import com.sright.common.response.SrightResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class TranscodeServiceImpl implements TranscodeService {

    @Autowired
    private VideoConvertManager videoConvertManager;

    /**
     * 素材转码
     * @param materialId 素材ID
     * @param filePath 素材路径
     * @param materialType 素材类型
     * @return
     */
    @Override
    public Boolean materialTranscode(Long materialId, String filePath, Integer materialType) {
        return videoConvertManager.materialTranscode(materialId,filePath,materialType);
    }

    @Override
    public SrightResponse callback(String mtsRequest) {
        return videoConvertManager.callback(mtsRequest);
    }
}
